package com.ruoyi.fsepc.service.impl;

import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.fsepc.domain.StConfiguration;
import com.ruoyi.fsepc.mapper.StConfigurationMapper;
import com.ruoyi.fsepc.service.IStConfigurationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 参数配置 参数配置Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-02-27
 */
@Service
public class StConfigurationServiceImpl implements IStConfigurationService
{
    @Autowired
    private StConfigurationMapper stConfigurationMapper;

    /**
     * 查询参数配置 参数配置
     * 
     * @param id 参数配置 参数配置ID
     * @return 参数配置 参数配置
     */
    @Override
    public StConfiguration selectStConfigurationById(Long id)
    {
        return stConfigurationMapper.selectStConfigurationById(id);
    }

    /**
     * 查询参数配置 参数配置列表
     * 
     * @param stConfiguration 参数配置 参数配置
     * @return 参数配置 参数配置
     */
    @Override
    public List<StConfiguration> selectStConfigurationList(StConfiguration stConfiguration)
    {
        return stConfigurationMapper.selectStConfigurationList(stConfiguration);
    }

    /**
     * 新增参数配置 参数配置
     * 
     * @param stConfiguration 参数配置 参数配置
     * @return 结果
     */
    @Override
    public int insertStConfiguration(StConfiguration stConfiguration)
    {
        stConfiguration.setCreateTime(DateUtils.getNowDate());
        return stConfigurationMapper.insertStConfiguration(stConfiguration);
    }

    /**
     * 修改参数配置 参数配置
     * 
     * @param stConfiguration 参数配置 参数配置
     * @return 结果
     */
    @Override
    public int updateStConfiguration(StConfiguration stConfiguration)
    {
        stConfiguration.setUpdateTime(DateUtils.getNowDate());
        return stConfigurationMapper.updateStConfiguration(stConfiguration);
    }

    /**
     * 删除参数配置 参数配置对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteStConfigurationByIds(String ids)
    {
        return stConfigurationMapper.deleteStConfigurationByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除参数配置 参数配置信息
     * 
     * @param id 参数配置 参数配置ID
     * @return 结果
     */
    @Override
    public int deleteStConfigurationById(Long id)
    {
        return stConfigurationMapper.deleteStConfigurationById(id);
    }
}
